package com.ruoyi.model;

public enum VideoTypeEnum {
    TYPE_MP4(3,"mp4"),
    UNKNONWN_TYPE(-1,"unkonwed");
    public int code;
    public String type;
    VideoTypeEnum(int code,String type){
        this.code =code;
        this.type = type;
    };

    public static VideoTypeEnum getType(int code){
        for (VideoTypeEnum it:VideoTypeEnum.values()) {
            if(it.code == code){
                return  it;
            }
        }
        return UNKNONWN_TYPE;
    }
}
